package com.alu.wcdma.puredata;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class PureDataActivity extends Activity {
    /** Called when the activity is first created. */
	private Button configButton, runButton, stopButton;
	private TextView statusView, logView;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        statusView = (TextView) findViewById(R.id.statusReport);
        logView = (TextView) findViewById(R.id.logReport);
        configButton = (Button) findViewById(R.id.configButton);
        runButton = (Button) findViewById(R.id.runButton);
        stopButton = (Button) findViewById(R.id.stopButton);
        stopButton.setClickable(false);
        configButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				Intent i = new Intent(PureDataActivity.this, ConfigActivity.class);
				startActivityForResult(i, REQUEST_CODE);
						
			}
		});
        runButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Run the script!!!
				stopButton.setClickable(true);
				
			}
		});
        
        stopButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Stop the script!!!
				
			}
		});
        
    }
}